<script type="text/javascript">
    var instagramAuth = "<?php echo $this->Html->url('/painel/social/instagram/autorizacao/', true); ?>";
    instagramAuth += location.hash.replace('#access_token=','');
    //alert(instagramAuth);
    window.location.href = instagramAuth;
</script>